<?php
 define('IN_DAEM', TRUE); include_once './includes/init.php'; $moduleSign = $_POST['module_sign']; $sql = "select * from ".DB_DAEMDB.".db_menu where module_sign = '".$moduleSign."'"; $result = $db->query_first($sql); if (!empty($result['module_sign'])) { $_SESSION['user_record']['last_visit'] = $moduleSign; if($result['level'] == '1') { $sql = "select * from ".DB_DAEMDB.".db_menu where m_id = '".$result['m_parentid']."'"; $result = $db->query_first($sql); if (!empty($result['module_sign'])) { $_SESSION['user_record']['last_mod'] = $result['module_sign']; } } elseif($result['level'] == '2') { $sql = "select * from ".DB_DAEMDB.".db_menu where m_id = '".$result['m_parentid']."'"; $result = $db->query_first($sql); $sql = "select * from ".DB_DAEMDB.".db_menu where m_id = '".$result['m_parentid']."'"; $result = $db->query_first($sql); if (!empty($result['module_sign'])) { $_SESSION['user_record']['last_mod'] = $result['module_sign']; } } } 